package com.jsu;

import java.util.Timer;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.support.StaticApplicationContext;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

import com.jsu.bean.CurrentMax;
import com.jsu.service.GetFoundFaceToken;
import com.jsu.service.GetLostFaceToken;
import com.jsu.task.FoundTask;

@SpringBootApplication
@MapperScan(basePackages="com.jsu.dao")
@EnableScheduling
public class SearchApplication {
	
	public static void main(String[] args) {
		SpringApplication.run(SearchApplication.class, args);
		
	}
	//若不配置，系统中所有的定时任务都是使用的一个线程去执行的，也就是说，如果
	//同一个时刻有2个定时任务需要执行，那么只可能有一个定时任务在执行
//	@Bean
//	public TaskScheduler taskScheduler(){
//		ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
//		//线程池大小
//		taskScheduler.setPoolSize(5);
//		//线程名字的前缀
//		taskScheduler.setThreadNamePrefix("springboot-task");
//	    return taskScheduler();
//	}
}
